<?php
global $global_config, $site_mods, $db, $module_name,$global_array_cat;
if($block_theme == "")
{
	$block_theme = "default";
}
$xtpl = new XTemplate("global.bando.tpl", NV_ROOTDIR . "/themes/" . $block_theme . "/blocks");
$sql = "SELECT  `p`.`pictureid` ,  `p`.`path` ,  `p`.`name` ,  `p`.`description` ,  `p`.`thumb_name` 
FROM  `" . NV_PREFIXLANG . "_albums_picture` p,  `" . NV_PREFIXLANG . "_albums_album` 
WHERE  `" . NV_PREFIXLANG . "_albums_album`.`is_map` =1
AND  `" . NV_PREFIXLANG . "_albums_album`.`albumid` =  `p`.`albumid` 
LIMIT 0 , 1";
$result = $db->sql_query($sql);

$rows = array();
while (list($pictureid, $path, $name, $description, $thumb_name) = $db->sql_fetchrow($result)) {
    $row['pictureid'] = $pictureid;
    $row['path'] = $path;
    $row['name'] = $name;
    $row['description'] = $description;
    $row['thumb_name'] = $thumb_name;
    $xtpl->assign("CONTENT", $row);
    $xtpl->parse("main.items");
    
}
$xtpl->parse("main");
$content = $xtpl->text("main");
?>
